#!/bin/bash

function killByName() {
    app_pid=`pidof $1`
    if [ -n "$app_pid" ];then
        kill -9 $app_pid
        echo "stop $1(pid=$app_pid) succeed"
    else
        echo "$1 not running, no need to stop"
    fi
}

app_name=notesync
killByName $app_name
